<?php
namespace App\Http\Controllers\Admin;
use App\Models\TxOrder;
/**
 * TestGuest Version1.0
 * ================================================
 * Copy 2017-2018 zxj
 * Web: http://www.zhaoxiaojie.club
 * ================================================
 * Author: Zxj
 * Date: 17/9/5
 * Time: 上午9:18
 *
 * 后台提现管理控制器
 *
 */
class TxController extends BaseController
{
    public function __construct(TxOrder $TxOrder)
    {
        parent::__construct();
        $this->txorder = $TxOrder; // 注入充值模型
    }


    // 提现列表页
    public function getIndex()
    {

        $flag = 'txorder';
        $data = $this->txorder->getTxOrderList(request());   //充值订单数据
        //dd($data);
        return view('admin.txorder.tx_list', compact('flag', 'data'));

    }

    //ajax改变提现状态
    public function postChange()
    {

        $ajaxData = $this->txorder->changeTxStatus(request());
        echo json_encode($ajaxData);

    }

}